﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace TestJQGrid.Tax_Section
{
    public partial class TaxMasterPage : System.Web.UI.Page
    {
        DataTable dt;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                fillDDState();
                fillTax();
            }
        }

        public void fillDDState()
        {
            dt = new DataTable();

            dt = GlobalMethods.ExecuteSelectQuery("select * from ValidValues where TableName='State'");
            LBStates.DataSource = dt;
            LBStates.SelectedValue = "Default";
            LBStates.DataBind();
        }

        public void fillTax()
        {
            dt = new DataTable();
            dt = GlobalMethods.ExecuteSelectQuery("select * from ValidValues where TableName='Taxes'");
            LBTaxes.DataSource = dt;
            LBTaxes.DataBind();
        }
    }
}